This implements the interface defined by Mecable, and defines an Object with a variable number of points.
|
|
| PointSet () |
| | Constructor.
|
| |
|
| PointSet (const PointSet &) |
| | Copy constructor.
|
| |
|
PointSet & | operator= (const PointSet &) |
| | Assignement operator.
|
| |
|
virtual | ~PointSet () |
| | Destructor.
|
| |
| virtual unsigned int | allocatePoints (unsigned int nbp) |
| | allocate memory to store 'nbp' points More...
|
| |
|
virtual void | deallocatePoints () |
| | free memory allocated by allocatePoints()
|
| |
|
unsigned int | nbPoints () const |
| | Number of points.
|
| |
|
unsigned int | lastPoint () const |
| | Index of the last point = nbPoints - 1.
|
| |
|
unsigned int | nbSegments () const |
| | Number of segments = nbPoints - 1.
|
| |
|
unsigned int | lastSegment () const |
| | Index of the last segment = nbPoints - 2.
|
| |
|
Vector | posP (const unsigned p) const |
| | Position of point 'p' of the object.
|
| |
|
real const * | addr () const |
| | Address of point p.
|
| |
|
real const * | addrPoint (const unsigned p) const |
| | Address of point p.
|
| |
|
void | setPoint (unsigned p, Vector const &w) |
| | Set position of point p to w.
|
| |
|
void | nbPoints (const unsigned n) |
| | Set the number of points in the array.
|
| |
|
unsigned int | addPoint (Vector const &w) |
| | Add a point, returning the array index that was used.
|
| |
|
void | removePoint (unsigned int p) |
| | Remove a point from the array psPos, returns number of points remaining.
|
| |
| virtual void | truncateM (unsigned int p) |
| | Remove all points with indices [ 0, p-1 ], keep [ p, nbPoints() ]. More...
|
| |
| virtual void | truncateP (unsigned int p) |
| | Keep points [ 0, p ], remove other points. More...
|
| |
|
void | clearPoints () |
| | Remove all points.
|
| |
|
void | resetPoints () |
| | Set all coordinates to zero (nicer for debug/testing)
|
| |
|
void | addNoise (real amount) |
| | Add random noise uniformly to all coordinate (used for testing purposes)
|
| |
|
virtual void | putPoints (real *) const |
| | copy current coordinates to argument
|
| |
|
virtual void | getPoints (const real *) |
| | replace current coordinates by provided ones
|
| |
|
virtual void | getForces (const real *ptr) |
| | replace current forces by the ones provided
|
| |
|
Vector | netForceP (const unsigned p) const |
| | Force on point p calculate by Brownian dynamics.
|
| |
|
void | movePoint (const unsigned int p, Vector const &w) |
| | Shift point at index p by vector w.
|
| |
|
Vector | diffPoints (const unsigned p) const |
| | Difference of two points = Q - P = vector PQ.
|
| |
|
Vector | diffPoints (const unsigned int p, const unsigned int q) const |
| | Difference of two points = Q - P = vector PQ.
|
| |
|
Vector | interpolatePoints (const unsigned int p, const unsigned int q, const real a) const |
| | Calculate intermediate position = P + a ( Q - P )
|
| |
| void | calculateMomentum (real[], bool divide=false) |
| | calculate first momentum of point coordinates More...
|
| |
| void | calculateMomentum (real[], real[], bool divide=false) |
| | calculate first and second momentum of point coordinates More...
|
| |
| virtual Vector | position () const |
| | Position of center of gravity. More...
|
| |
|
virtual bool | translatable () const |
| | true if object accepts translations
|
| |
|
virtual void | translate (Vector const &) |
| | Translate object (moves all the points by w)
|
| |
|
virtual bool | rotatable () const |
| | true if object accepts translations
|
| |
|
virtual void | rotate (Rotation const &) |
| | Rotate object by given rotation.
|
| |
|
virtual void | foldPosition (const Modulo *) |
| | Modulo around the first point.
|
| |
|
virtual void | foldPositionG (const Modulo *) |
| | Call modulo around the center of gravity.
|
| |
|
void | write (OutputWrapper &) const |
| | Write to file.
|
| |
|
void | read (InputWrapper &, Simul &) |
| | Read from file.
|
| |
|
| Mecable () |
| | The constructor resets the pointers.
|
| |
|
virtual | ~Mecable () |
| | Destructor de-allocates memory.
|
| |
|
virtual Vector | posP (unsigned int P) const =0 |
| | return position of point P
|
| |
|
virtual void | putPoints (real[]) const =0 |
| | copy current coordinates to provided array
|
| |
|
virtual void | getPoints (const real[])=0 |
| | replace current coordinates of points by values from the provided array
|
| |
|
virtual Vector | netForceP (unsigned int p) const =0 |
| | return Force on point p calculated at previous step by Brownian dynamics
|
| |
|
virtual void | getForces (const real[])=0 |
| | replace current forces by the ones provided
|
| |
|
void | matIndex (Matrix::index_type index) |
| | Store the index where coordinates are located in Meca.
|
| |
| Matrix::index_type | matIndex () const |
| | Index in mB of the first point. the index in the vectors is DIM*matIndex() More...
|
| |
|
bool | useBlock () const |
| | Tell Meca to use preconditionning on this object or not.
|
| |
|
void | useBlock (bool b) |
| | change preconditionning flag
|
| |
|
real * | allocateBlock (unsigned) |
| | Allocate a block of the requested size.
|
| |
|
real * | block () const |
| | return allocated block
|
| |
|
virtual void | setDragCoefficient ()=0 |
| | Calculate the mobility coefficient.
|
| |
|
virtual real | dragCoefficient () const =0 |
| | The total drag coefficient of object ( force = drag * speed )
|
| |
| virtual void | prepareMecable ()=0 |
| | prepare the Mecable to solve the mechanics in Meca::solve() More...
|
| |
|
virtual real | addBrownianForces (real *rhs, real sc) const |
| | Add Brownian noise terms to a force vector (sc = kT / dt)
|
| |
| virtual void | addRigidity (const real *X, real *Y) const |
| | Add rigidity terms Y <- Y + Rigidity * X. More...
|
| |
| virtual void | addRigidityMatUp (Matrix &mB, int offset) const |
| | Add rigidity matrix elements (which should be symmetric) to provided matrix. More...
|
| |
| virtual void | setSpeedsFromForces (const real *X, real *Y, real sc=1.0, bool rhs=false) const =0 |
| | Calculate speeds from given forces. More...
|
| |
| virtual void | makeProjectionDiff (const real *forces) |
| | set the terms obtained from the linearization of the Projection operator, from the given forces More...
|
| |
| virtual void | addProjectionDiff (const real *X, real *Y) const |
| | add terms from projection correction terms: Y <- Y + P' * X; More...
|
| |
|
virtual void | setInteractions (Meca &) const |
| | add the interactions (for example due to confinements)
|
| |
|
| Object () |
| | constructor
|
| |
|
virtual Tag | tag () const =0 |
| | an ASCII character identifying the ObjectSet corresponding to this object
|
| |
|
virtual const Property * | property () const =0 |
| | Property associated with the Object.
|
| |
| std::string | reference () const |
| | concatenation of [ tag(), property()->index(), number() ] in plain ascii More...
|
| |
| void | writeReference (OutputWrapper &) const |
| | write a reference that identifies the Object uniquely More...
|
| |
| void | writeReference (OutputWrapper &, Tag tag) const |
| | write a reference, but using the provided Tag More...
|
| |
|
int | mark () const |
| | birth mark value
|
| |
|
void | mark (int m) |
| | set birth mark
|
| |
|
int | fleck () const |
| | fleck value (not stored in trajectory files)
|
| |
|
void | fleck (int f) const |
| | set fleck (the value is not stored in trajectory files)
|
| |
|
Object * | next () const |
| | extends Node::next(), with a cast to preserve type
|
| |
|
Object * | prev () const |
| | extends Node::prev(), with a cast to preserve type
|
| |
|
| Node () |
| | constructor set as unlinked
|
| |
| virtual | ~Node () |
| | destructor More...
|
| |
|
bool | linked () const |
| | true if Node is linked
|
| |
|
Node * | next () const |
| | the next Node in the list, or zero if this is last
|
| |
|
Node * | prev () const |
| | the previous Node in the list, or zero if this is first
|
| |
|
NodeList * | list () const |
| | the list where the object is linked, or zero
|
| |
|
ObjectSet * | objset () const |
| | return associated ObjectSet
|
| |
|
| Inventoried () |
| | initialize (name=0)
|
| |
|
| ~Inventoried () |
| | destructor
|
| |
|
void | number (Number n) |
| | change the serial number
|
| |
|
Number | number () const |
| | serial number : a integer identifier, unique within each class
|
| |
|
| Movable () |
| | constructor
|
| |
|
virtual | ~Movable () |
| | destructor
|
| |
| virtual void | setPosition (Vector const &) |
| | move object to specified position More...
|
| |
| virtual void | rotateP (Rotation const &) |
| | rotate the object around its current position More...
|
| |
|
virtual | ~Buddy () |
| | upon destruction, goodbye is called for all buddies
|
| |
|
void | hello (Buddy *b) |
| | will make this and b mutual buddies
|
| |
|
virtual void | goodbye (Buddy *) |
| | this is called everytime a known buddy is destroyed
|
| |
|
Buddy * | buddy (unsigned int ix) const |
| | return buddy at index ix
|
| |
|
void | buddy (Buddy *b, unsigned int ix) |
| | replace the buddy that may have been at index ix
|
| |